package net.oschina.jhssm.common.service.impl;

import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * Created by ZhaoJinBing on 2017/6/28.
 */
public class BaseServiceImpl<T> {

    protected Mapper<T> baseMapper;

    public List<T> select(T t) {
        return baseMapper.select(t);
    }

    public List<T> selectAll() {
        return baseMapper.selectAll();
    }

    public T selectByPrimaryKey(Object key) {
        return baseMapper.selectByPrimaryKey(key);
    }

    public int selectCount(T t) {
        return baseMapper.selectCount(t);
    }

    public T selectOne(T t) {
        return baseMapper.selectOne(t);
    }

    public int insert(T t) {
        return baseMapper.insert(t);
    }

    public int insertSelective(T t) {
        return baseMapper.insertSelective(t);
    }

    public int updateByPrimaryKey(T t) {
        return baseMapper.updateByPrimaryKey(t);
    }

    public int updateByPrimaryKeySelective(T t) {
        return baseMapper.updateByPrimaryKeySelective(t);
    }

    public int delete(T t) {
        return baseMapper.delete(t);
    }

    public int deleteByPrimaryKey(Object key) {
        return baseMapper.deleteByPrimaryKey(key);
    }

    public boolean existsWithPrimaryKey(Object key) {
        return baseMapper.existsWithPrimaryKey(key);
    }
}
